package com.crm.business.crm.service;


import com.crm.common.crm.entity.BO.CrmModelSaveBO;
import com.crm.common.crm.entity.BO.CrmRoiSearchBO;
import com.crm.common.crm.entity.BO.CrmUpdateInformationBO;
import com.crm.common.crm.entity.PO.CrmAllianceBusiness;
import com.crm.common.crm.entity.VO.CrmModelFiledVO;
import com.crm.common.ka.core.entity.BasePage;
import com.crm.business.servlet.BaseService;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 加盟商充值表 服务类
 * </p>
 *
 * @author zhangzhiwei
 * @since 2020-05-26
 */
public interface ICrmAllianceBusinessService extends BaseService<CrmAllianceBusiness> {
    /**
     * 查询字段配置
     *
     * @param id 主键ID
     * @return data
     */
    public CrmAllianceBusiness queryById(Integer id);

    /**
     * 删除投放金额数据
     *
     * @param ids ids
     */
    public void deleteByIds(List<Integer> ids);

    /**
     * 分页查询
     *
     * @param search
     * @return
     */
    public BasePage<CrmAllianceBusiness> queryPageList(@RequestBody CrmRoiSearchBO search);

    /**
     * 保存或新增信息
     *
     * @param crmModel model
     */
    public void addOrUpdate(CrmModelSaveBO crmModel);

    void updateInformation(CrmUpdateInformationBO updateInformationBO);

    /**
     * 查询字段配置
     *
     * @param id 主键ID
     * @return data
     */
    public List<CrmModelFiledVO> queryField(Integer id);

    /**
     * 下载导入模板
     *
     * @param response 线索id
     * @throws IOException exception
     */
    public void downloadExcel(HttpServletResponse response) throws IOException;

    /**
     * 导出
     *
     * @param response resp
     * @param search   搜索对象
     */
    public void exportExcel(HttpServletResponse response, CrmRoiSearchBO search);


    public CrmAllianceBusiness getListById(Integer id);


}
